package com.digitalart.site.section {
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.utils.getDefinitionByName;
	import flash.utils.getQualifiedClassName;

	/**
	 * @author johan.chaves
	 */
	public class Section extends Sprite{
		 
		public static const ON_LOAD_COMPLETE:String = "onLoadComplete";
		public static const ON_SHOW_COMPLETE:String = "onShowComplete";
		public static const ON_HIDE_COMPLETE:String = "onHideComplete";
		public static const SECTION_WIDTH : Number = 735;
		public static const SECTION_HEIGHT : Number = 440;
		public static const SECTION_Y_POS : Number = 38;
		public static const SECTION_X_POS : Number = 15;		
		
		private var _id : String;		
		
		/**********************************Constructor*************************/
		public function Section(){
			if(Class(getDefinitionByName(getQualifiedClassName(this)))== Section){
				throw new Error("Abstract Class must not be directly instantiated");
		 	} 
		}
		/**********************************************************************/
		
		/**********************************Methods*****************************/		 
		public function show():void{
			 throw new Error("Abstract method must not be directly used");
		}
		public function hide():void{
			 throw new Error("Abstract method must not be directly used");			
		}
		public function load(): void{
			 throw new Error("Abstract method must not be directly used");
		}
		public function onLoadComplete(event : Event):void{
			throw new Error("Abstract method must not be directly used");
		}		
		
		public function setBackgroundSettings():void{
			var back : Sprite = new Sprite();
			back.graphics.beginFill(0x000000);
			back.graphics.drawRect(0, 0, SECTION_WIDTH, SECTION_HEIGHT);
			back.graphics.endFill();
			back.alpha = 0;
			this.x = SECTION_X_POS;
			this.y = SECTION_Y_POS;
			addChild(back);			
		}

		public function get id() : String {
			return _id;
		}
		
		public function set id(id : String) : void {
			_id = id;
		}
	}
}


